Resource URL: /platform/<<version=1>>/auth/mapping/identities/<SOURCE>

    Overview: This resource provides external interface to the idmap.

     Methods: GET, POST, DELETE

********************************************************************************

Method GET: Retrieve all identity mappings (uid, gid, sid, and on-disk) for the
            supplied source persona.

       URL: GET /platform/<<version=1>>/auth/mapping/identities/<SOURCE>

Query arguments:
nocreate=<boolean> Idmap should attempt to create missing identity mappings.
     zone=<string> Optional zone.

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "identities": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "description": "Specifies properties for the identity mapping entry.", 
            "properties": {
              "source": {
                "required": true, 
                "type": [
                  {
                    "type": "object", 
                    "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
                    "properties": {
                      "type": {
                        "enum": [
                          "user", 
                          "group", 
                          "wellknown"
                        ], 
                        "type": "string", 
                        "description": "Specifies the type of persona, which must be combined with a name."
                      }, 
                      "id": {
                        "minLength": 0, 
                        "type": "string", 
                        "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'.", 
                        "maxLength": 261
                      }, 
                      "name": {
                        "minLength": 0, 
                        "type": "string", 
                        "description": "Specifies the persona name, which must be combined with a type.", 
                        "maxLength": 255
                      }
                    }
                  }
                ], 
                "description": "Specifies the source identity."
              }, 
              "id": {
                "minLength": 0, 
                "required": true, 
                "type": "string", 
                "description": "Specifies the identity mapping entry id.", 
                "maxLength": 255
              }, 
              "targets": {
                "minItems": 0, 
                "items": {
                  "type": "object", 
                  "description": "Specifies the target identity mappings.", 
                  "properties": {
                    "on_disk": {
                      "required": false, 
                      "type": "boolean", 
                      "description": "If true, the identity is preferred on-disk."
                    }, 
                    "type": {
                      "enum": [
                        "auto", 
                        "external", 
                        "manual"
                      ], 
                      "type": "string", 
                      "description": "Specifies the origin of the identity mapping.", 
                      "required": false
                    }, 
                    "target": {
                      "required": true, 
                      "type": [
                        {
                          "type": "object", 
                          "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
                          "properties": {
                            "type": {
                              "enum": [
                                "user", 
                                "group", 
                                "wellknown"
                              ], 
                              "type": "string", 
                              "description": "Specifies the type of persona, which must be combined with a name."
                            }, 
                            "id": {
                              "minLength": 0, 
                              "type": "string", 
                              "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'.", 
                              "maxLength": 261
                            }, 
                            "name": {
                              "minLength": 0, 
                              "type": "string", 
                              "description": "Specifies the persona name, which must be combined with a type.", 
                              "maxLength": 255
                            }
                          }
                        }
                      ], 
                      "description": "Specifies the target identity."
                    }
                  }
                }, 
                "required": true, 
                "type": "array", 
                "maxItems": 4294967295
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }
      }
    }
  ]
}

********************************************************************************

Method POST: Manually set or modify a mapping between two personae.

        URL: POST /platform/<<version=1>>/auth/mapping/identities/<SOURCE>

Query arguments:
  type=<enum> Where <enum> is one of uid, gid, sid.  Desired mapping target to
              fetch/generate.
zone=<string> Optional zone.

POST request body schema:
{
  "type": [
    "null", 
    "object"
  ], 
  "description": "Null or any empty JSON object.", 
  "properties": {}
}

POST response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "identities": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "description": "Specifies properties for the identity mapping entry.", 
            "properties": {
              "source": {
                "required": true, 
                "type": [
                  {
                    "type": "object", 
                    "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
                    "properties": {
                      "type": {
                        "enum": [
                          "user", 
                          "group", 
                          "wellknown"
                        ], 
                        "type": "string", 
                        "description": "Specifies the type of persona, which must be combined with a name."
                      }, 
                      "id": {
                        "minLength": 0, 
                        "type": "string", 
                        "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'.", 
                        "maxLength": 261
                      }, 
                      "name": {
                        "minLength": 0, 
                        "type": "string", 
                        "description": "Specifies the persona name, which must be combined with a type.", 
                        "maxLength": 255
                      }
                    }
                  }
                ], 
                "description": "Specifies the source identity."
              }, 
              "id": {
                "minLength": 0, 
                "required": true, 
                "type": "string", 
                "description": "Specifies the identity mapping entry id.", 
                "maxLength": 255
              }, 
              "targets": {
                "minItems": 0, 
                "items": {
                  "type": "object", 
                  "description": "Specifies the target identity mappings.", 
                  "properties": {
                    "on_disk": {
                      "required": false, 
                      "type": "boolean", 
                      "description": "If true, the identity is preferred on-disk."
                    }, 
                    "type": {
                      "enum": [
                        "auto", 
                        "external", 
                        "manual"
                      ], 
                      "type": "string", 
                      "description": "Specifies the origin of the identity mapping.", 
                      "required": false
                    }, 
                    "target": {
                      "required": true, 
                      "type": [
                        {
                          "type": "object", 
                          "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
                          "properties": {
                            "type": {
                              "enum": [
                                "user", 
                                "group", 
                                "wellknown"
                              ], 
                              "type": "string", 
                              "description": "Specifies the type of persona, which must be combined with a name."
                            }, 
                            "id": {
                              "minLength": 0, 
                              "type": "string", 
                              "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'.", 
                              "maxLength": 261
                            }, 
                            "name": {
                              "minLength": 0, 
                              "type": "string", 
                              "description": "Specifies the persona name, which must be combined with a type.", 
                              "maxLength": 255
                            }
                          }
                        }
                      ], 
                      "description": "Specifies the target identity."
                    }
                  }
                }, 
                "required": true, 
                "type": "array", 
                "maxItems": 4294967295
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }
      }
    }
  ]
}

********************************************************************************

Method DELETE: Flush the entire idmap cache.

          URL: DELETE /platform/<<version=1>>/auth/mapping/identities/<SOURCE>

Query arguments:
  2way=<boolean> Delete the bi-directional mapping from source to target and
                 target to source.
 target=<string> Target identity persona.
   zone=<string> Optional zone.
remove=<boolean> Delete mapping instead of flush mapping from cache.

There is no JSON response body for this method.
